package com.frank.demo.java.rmi;

import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;

/**
 * Created by Administrator on 2018/10/14 0014.
 */
public class Server {

    public static void main(String[] args) throws RemoteException, AlreadyBoundException, MalformedURLException {
        LocateRegistry.createRegistry(12312);
        Hello h = new HelloImpl();
        Naming.bind("rmi://127.0.0.1:12312/Hello", h);
        System.out.println("HelloServer启动成功");
    }
}
